using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.H_AdminTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HL_AdminTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HL_AdminTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HL_Admin";
			dataTableMapping.ColumnMappings.Add("Admin_ID", "Admin_ID");
			dataTableMapping.ColumnMappings.Add("UserName", "UserName");
			dataTableMapping.ColumnMappings.Add("PassWord", "PassWord");
			dataTableMapping.ColumnMappings.Add("LastLogin", "LastLogin");
			dataTableMapping.ColumnMappings.Add("LastLoginIP", "LastLoginIP");
			dataTableMapping.ColumnMappings.Add("LoginTimes", "LoginTimes");
			dataTableMapping.ColumnMappings.Add("AcceptIP", "AcceptIP");
			dataTableMapping.ColumnMappings.Add("SecurityKey", "SecurityKey");
			dataTableMapping.ColumnMappings.Add("LoginDate", "LoginDate");
			dataTableMapping.ColumnMappings.Add("LoginIP", "LoginIP");
			dataTableMapping.ColumnMappings.Add("Disable", "Disable");
			dataTableMapping.ColumnMappings.Add("EndDate", "EndDate");
			dataTableMapping.ColumnMappings.Add("Access", "Access");
			dataTableMapping.ColumnMappings.Add("Remark", "Remark");
			dataTableMapping.ColumnMappings.Add("Power", "Power");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HL_Admin] WHERE (([Admin_ID] = @Original_Admin_ID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_Admin_ID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Admin_ID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HL_Admin] ([UserName], [PassWord], [LastLogin], [LastLoginIP], [LoginTimes], [AcceptIP], [SecurityKey], [LoginDate], [LoginIP], [Disable], [EndDate], [Access], [Remark], [Power]) VALUES (@UserName, @PassWord, @LastLogin, @LastLoginIP, @LoginTimes, @AcceptIP, @SecurityKey, @LoginDate, @LoginIP, @Disable, @EndDate, @Access, @Remark, @Power)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PassWord", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "PassWord", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@LastLogin", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "LastLogin", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@LastLoginIP", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "LastLoginIP", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@LoginTimes", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "LoginTimes", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@AcceptIP", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "AcceptIP", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SecurityKey", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "SecurityKey", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@LoginDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "LoginDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@LoginIP", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "LoginIP", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Disable", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "Disable", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@EndDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "EndDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Access", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Access", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Power", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Power", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HL_Admin] SET [UserName] = @UserName, [PassWord] = @PassWord, [LastLogin] = @LastLogin, [LastLoginIP] = @LastLoginIP, [LoginTimes] = @LoginTimes, [AcceptIP] = @AcceptIP, [SecurityKey] = @SecurityKey, [LoginDate] = @LoginDate, [LoginIP] = @LoginIP, [Disable] = @Disable, [EndDate] = @EndDate, [Access] = @Access, [Remark] = @Remark, [Power] = @Power WHERE (([Admin_ID] = @Original_Admin_ID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PassWord", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "PassWord", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@LastLogin", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "LastLogin", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@LastLoginIP", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "LastLoginIP", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@LoginTimes", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "LoginTimes", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@AcceptIP", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "AcceptIP", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SecurityKey", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "SecurityKey", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@LoginDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "LoginDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@LoginIP", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "LoginIP", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Disable", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "Disable", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@EndDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "EndDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Access", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Access", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Power", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Power", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_Admin_ID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Admin_ID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[10];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT Admin_ID, UserName, PassWord, LastLogin, LastLoginIP, LoginTimes, AcceptIP, \r\n      SecurityKey, LoginDate, LoginIP, Disable, EndDate, Access, Remark, Power\r\nFROM HL_Admin";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "PR_AddTOGroup";
			this._commandCollection[1].CommandType = CommandType.StoredProcedure;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[1].Parameters.Add(new SqlParameter("@AddTOGroup", SqlDbType.VarChar, 2000, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "PR_DeleteAdmin";
			this._commandCollection[2].CommandType = CommandType.StoredProcedure;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@Admin_ID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT AcceptIP, Access, Admin_ID, Disable, EndDate, LastLogin, LastLoginIP, LoginDate, \r\n      LoginIP, LoginTimes, PassWord, Power, Remark, SecurityKey, UserName\r\nFROM HL_Admin\r\nWHERE (Admin_ID = @Admin_ID)";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@Admin_ID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "Admin_ID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "SELECT AcceptIP, Access, Admin_ID, Disable, EndDate, LastLogin, LastLoginIP, LoginDate, \r\n      LoginIP, LoginTimes, PassWord, Power, Remark, SecurityKey, UserName\r\nFROM HL_Admin\r\nWHERE (UserName = @UserName)";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "SELECT HL_Admin.Admin_ID, HL_Admin.UserName, HL_Admin.PassWord, \r\n      HL_Admin.LastLogin, HL_Admin.LastLoginIP, HL_Admin.LoginTimes, \r\n      HL_Admin.AcceptIP, HL_Admin.SecurityKey, HL_Admin.LoginDate, HL_Admin.LoginIP, \r\n      HL_Admin.Disable, HL_Admin.EndDate, HL_Admin.Access, HL_Admin.Remark, \r\n      HL_Admin.Power, HL_AdminGroup.AdminGroupName, \r\n      HL_AdminGroup.AdminGourpID\r\nFROM HL_Admin INNER JOIN\r\n      HL_AdminUserGroup ON \r\n      HL_Admin.Admin_ID = HL_AdminUserGroup.AdminID INNER JOIN\r\n      HL_AdminGroup ON \r\n      HL_AdminUserGroup.GroupID = HL_AdminGroup.AdminGourpID\r\nWHERE (HL_AdminUserGroup.GroupID = @GroupID)";
			this._commandCollection[5].CommandType = CommandType.Text;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@GroupID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "GroupID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "SELECT AcceptIP, Access, Admin_ID, Disable, EndDate, LastLogin, LastLoginIP, LoginDate, LoginIP, LoginTimes, PassWord, Power, Remark, SecurityKey, UserName FROM HL_Admin WHERE (UserName = @AdminName) AND (PassWord = @AdminPassword)";
			this._commandCollection[6].CommandType = CommandType.Text;
			this._commandCollection[6].Parameters.Add(new SqlParameter("@AdminName", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@AdminPassword", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "PassWord", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "PR_InsertAdmin";
			this._commandCollection[7].CommandType = CommandType.StoredProcedure;
			this._commandCollection[7].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@UserName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@PassWord", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@LastLogin", SqlDbType.DateTime, 8, ParameterDirection.Input, 23, 3, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@LastLoginIP", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@LoginTimes", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@AcceptIP", SqlDbType.Text, 2147483647, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@SecurityKey", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@LoginDate", SqlDbType.DateTime, 8, ParameterDirection.Input, 23, 3, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@LoginIP", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@Disable", SqlDbType.Bit, 1, ParameterDirection.Input, 1, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@EndDate", SqlDbType.DateTime, 8, ParameterDirection.Input, 23, 3, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@Access", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@Remark", SqlDbType.Text, 2147483647, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@POWER", SqlDbType.VarChar, 500, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8] = new SqlCommand();
			this._commandCollection[8].Connection = this.Connection;
			this._commandCollection[8].CommandText = "PR_UpdateAdmin";
			this._commandCollection[8].CommandType = CommandType.StoredProcedure;
			this._commandCollection[8].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@UserName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@PassWord", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@LastLogin", SqlDbType.DateTime, 8, ParameterDirection.Input, 23, 3, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@LastLoginIP", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@LoginTimes", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@AcceptIP", SqlDbType.Text, 2147483647, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@SecurityKey", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@LoginDate", SqlDbType.DateTime, 8, ParameterDirection.Input, 23, 3, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@LoginIP", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@Disable", SqlDbType.Bit, 1, ParameterDirection.Input, 1, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@EndDate", SqlDbType.DateTime, 8, ParameterDirection.Input, 23, 3, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@Access", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@Remark", SqlDbType.Text, 2147483647, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@Power", SqlDbType.VarChar, 500, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@Admin_ID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@updatetogroup", SqlDbType.Text, 2147483647, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9] = new SqlCommand();
			this._commandCollection[9].Connection = this.Connection;
			this._commandCollection[9].CommandText = "UPDATE HL_Admin\r\nSET PassWord = @PassWord, SecurityKey =@SecurityKey \r\nWHERE (Admin_ID = @Admin_ID)";
			this._commandCollection[9].CommandType = CommandType.Text;
			this._commandCollection[9].Parameters.Add(new SqlParameter("@PassWord", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "PassWord", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9].Parameters.Add(new SqlParameter("@SecurityKey", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, "SecurityKey", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9].Parameters.Add(new SqlParameter("@Admin_ID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "Admin_ID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Admin.HL_AdminDataTable GetAllAdmin()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			H_Admin.HL_AdminDataTable hL_AdminDataTable = new H_Admin.HL_AdminDataTable();
			this.Adapter.Fill(hL_AdminDataTable);
			return hL_AdminDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Admin.HL_AdminDataTable GetAdminByAdminID(int Admin_ID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			this.Adapter.SelectCommand.Parameters[0].Value = Admin_ID;
			H_Admin.HL_AdminDataTable hL_AdminDataTable = new H_Admin.HL_AdminDataTable();
			this.Adapter.Fill(hL_AdminDataTable);
			return hL_AdminDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Admin.HL_AdminDataTable GetAdminByAdminName(string UserName)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			if (UserName == null)
			{
				throw new System.ArgumentNullException("UserName");
			}
			this.Adapter.SelectCommand.Parameters[0].Value = UserName;
			H_Admin.HL_AdminDataTable hL_AdminDataTable = new H_Admin.HL_AdminDataTable();
			this.Adapter.Fill(hL_AdminDataTable);
			return hL_AdminDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Admin.HL_AdminDataTable GetAdminByGroupID(int? GroupID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (GroupID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = GroupID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			H_Admin.HL_AdminDataTable hL_AdminDataTable = new H_Admin.HL_AdminDataTable();
			this.Adapter.Fill(hL_AdminDataTable);
			return hL_AdminDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Admin.HL_AdminDataTable GetAdminByNamePassword(string AdminName, string AdminPassword)
		{
			this.Adapter.SelectCommand = this.CommandCollection[6];
			if (AdminName == null)
			{
				throw new System.ArgumentNullException("AdminName");
			}
			this.Adapter.SelectCommand.Parameters[0].Value = AdminName;
			if (AdminPassword == null)
			{
				throw new System.ArgumentNullException("AdminPassword");
			}
			this.Adapter.SelectCommand.Parameters[1].Value = AdminPassword;
			H_Admin.HL_AdminDataTable hL_AdminDataTable = new H_Admin.HL_AdminDataTable();
			this.Adapter.Fill(hL_AdminDataTable);
			return hL_AdminDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Admin.HL_AdminDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Admin dataSet)
		{
			return this.Adapter.Update(dataSet, "HL_Admin");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int AddTOGroup(string AddTOGroup1)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			if (AddTOGroup1 == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = AddTOGroup1;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteAdmin(int? Admin_ID)
		{
			SqlCommand sqlCommand = this.CommandCollection[2];
			if (Admin_ID.HasValue)
			{
				sqlCommand.Parameters[1].Value = Admin_ID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual object InsertAdmin(string UserName, string PassWord, System.DateTime? LastLogin, string LastLoginIP, int? LoginTimes, string AcceptIP, string SecurityKey, System.DateTime? LoginDate, string LoginIP, bool? Disable, System.DateTime? EndDate, int? Access, string Remark, string POWER)
		{
			SqlCommand sqlCommand = this.CommandCollection[7];
			if (UserName == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = UserName;
			}
			if (PassWord == null)
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = PassWord;
			}
			if (LastLogin.HasValue)
			{
				sqlCommand.Parameters[3].Value = LastLogin.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (LastLoginIP == null)
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = LastLoginIP;
			}
			if (LoginTimes.HasValue)
			{
				sqlCommand.Parameters[5].Value = LoginTimes.Value;
			}
			else
			{
				sqlCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (AcceptIP == null)
			{
				sqlCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[6].Value = AcceptIP;
			}
			if (SecurityKey == null)
			{
				sqlCommand.Parameters[7].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[7].Value = SecurityKey;
			}
			if (LoginDate.HasValue)
			{
				sqlCommand.Parameters[8].Value = LoginDate.Value;
			}
			else
			{
				sqlCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (LoginIP == null)
			{
				sqlCommand.Parameters[9].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[9].Value = LoginIP;
			}
			if (Disable.HasValue)
			{
				sqlCommand.Parameters[10].Value = Disable.Value;
			}
			else
			{
				sqlCommand.Parameters[10].Value = System.DBNull.Value;
			}
			if (EndDate.HasValue)
			{
				sqlCommand.Parameters[11].Value = EndDate.Value;
			}
			else
			{
				sqlCommand.Parameters[11].Value = System.DBNull.Value;
			}
			if (Access.HasValue)
			{
				sqlCommand.Parameters[12].Value = Access.Value;
			}
			else
			{
				sqlCommand.Parameters[12].Value = System.DBNull.Value;
			}
			if (Remark == null)
			{
				sqlCommand.Parameters[13].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[13].Value = Remark;
			}
			if (POWER == null)
			{
				sqlCommand.Parameters[14].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[14].Value = POWER;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			object obj;
			try
			{
				obj = sqlCommand.ExecuteScalar();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			object result;
			if (obj == null || obj.GetType() == typeof(System.DBNull))
			{
				result = null;
			}
			else
			{
				result = obj;
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateAdmin(string UserName, string PassWord, System.DateTime? LastLogin, string LastLoginIP, int? LoginTimes, string AcceptIP, string SecurityKey, System.DateTime? LoginDate, string LoginIP, bool? Disable, System.DateTime? EndDate, int? Access, string Remark, string Power, int? Admin_ID, string updatetogroup)
		{
			SqlCommand sqlCommand = this.CommandCollection[8];
			if (UserName == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = UserName;
			}
			if (PassWord == null)
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = PassWord;
			}
			if (LastLogin.HasValue)
			{
				sqlCommand.Parameters[3].Value = LastLogin.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (LastLoginIP == null)
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = LastLoginIP;
			}
			if (LoginTimes.HasValue)
			{
				sqlCommand.Parameters[5].Value = LoginTimes.Value;
			}
			else
			{
				sqlCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (AcceptIP == null)
			{
				sqlCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[6].Value = AcceptIP;
			}
			if (SecurityKey == null)
			{
				sqlCommand.Parameters[7].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[7].Value = SecurityKey;
			}
			if (LoginDate.HasValue)
			{
				sqlCommand.Parameters[8].Value = LoginDate.Value;
			}
			else
			{
				sqlCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (LoginIP == null)
			{
				sqlCommand.Parameters[9].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[9].Value = LoginIP;
			}
			if (Disable.HasValue)
			{
				sqlCommand.Parameters[10].Value = Disable.Value;
			}
			else
			{
				sqlCommand.Parameters[10].Value = System.DBNull.Value;
			}
			if (EndDate.HasValue)
			{
				sqlCommand.Parameters[11].Value = EndDate.Value;
			}
			else
			{
				sqlCommand.Parameters[11].Value = System.DBNull.Value;
			}
			if (Access.HasValue)
			{
				sqlCommand.Parameters[12].Value = Access.Value;
			}
			else
			{
				sqlCommand.Parameters[12].Value = System.DBNull.Value;
			}
			if (Remark == null)
			{
				sqlCommand.Parameters[13].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[13].Value = Remark;
			}
			if (Power == null)
			{
				sqlCommand.Parameters[14].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[14].Value = Power;
			}
			if (Admin_ID.HasValue)
			{
				sqlCommand.Parameters[15].Value = Admin_ID.Value;
			}
			else
			{
				sqlCommand.Parameters[15].Value = System.DBNull.Value;
			}
			if (updatetogroup == null)
			{
				sqlCommand.Parameters[16].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[16].Value = updatetogroup;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateAdminPassword(string PassWord, string SecurityKey, int Admin_ID)
		{
			SqlCommand sqlCommand = this.CommandCollection[9];
			if (PassWord == null)
			{
				throw new System.ArgumentNullException("PassWord");
			}
			sqlCommand.Parameters[0].Value = PassWord;
			if (SecurityKey == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = SecurityKey;
			}
			sqlCommand.Parameters[2].Value = Admin_ID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
